﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartSiteManagementSystem.Models.WorkTask
{
    /// <summary>
    /// 任务集
    /// </summary>
    [Serializable]
    public class TaskSetInfo
    {

        #region 数据库对应字段
        private int _setId;
        /// <summary>
        /// 任务集标识
        /// </summary>
        public int SetId
        {
            get { return _setId; }
            set { _setId = value; }
        }


        private string _setName;

        /// <summary>
        /// 任务集名称
        /// </summary>
        public string SetName
        {
            get { return _setName; }
            set { _setName = value; }
        }


        /// <summary>
        /// 
        /// </summary>
        private string _descript;

        /// <summary>
        /// 任务集描述
        /// </summary>
        public string Descript
        {
            get { return _descript; }
            set { _descript = value; }
        }


        private double _vr;
        /// <summary>
        /// 径向速度 eg 60m/min  60
        /// </summary>
        public double Vr
        {
            get { return _vr; }
            set { _vr = value; }
        }

        private double _va;
        /// <summary>
        ///角速度 eg 0.5m/min 0.5
        /// </summary>
        public double Va
        {
            get { return _va; }
            set { _va = value; }
        }


        private double _vh;
        /// <summary>
        ///垂直行程速度 eg 136m/min 136
        /// </summary>
        public double Vh
        {
            get { return _vh; }
            set { _vh = value; }
        }


        private double _vhLoadAndUloadDistance;
        /// <summary>
        /// 垂直行程最小提升距离的总距离  eg 4
        /// </summary>
        public double VhLoadAndUloadDistance
        {
            get { return _vhLoadAndUloadDistance; }
            set { _vhLoadAndUloadDistance = value; }
        }

        /// <summary>
        /// 是否删除 逻辑删  1 删除 0 
        /// </summary>
        private bool _isDelete;

        public bool IsDelete
        {
            get { return _isDelete; }
            set { _isDelete = value; }

        }



        private DateTime _startTime;
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime StartTime
        {
            set { _startTime = value; }
            get { return _startTime; }
        }

        private DateTime _createtime;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime
        {
            set { _createtime = value; }
            get { return _createtime; }
        }

        private DateTime _updatetime;
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime
        {
            set { _updatetime = value; }
            get { return _updatetime; }
        }

        #endregion


        #region 扩展字段
        //任务列表
        public IList<TaskInfo> taskInfosList = new List<TaskInfo>();

        #endregion 

        public override string ToString()
        {
            StringBuilder back = new StringBuilder();
            back.Append("任务集合" + this.SetId.ToString() + "\n");
            back.Append("*****************任务列表*******************\n");
            if (this.taskInfosList != null)
            {
                for (int i = 0; i < this.taskInfosList.Count; i++)
                {

                    back.Append(this.taskInfosList[i].ToString() + "\n");
                    back.Append("\n");
                }
            }
            back.Append("\n");
            return back.ToString();
        }

    }
}
